import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)
export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: {
        path: '/home'
      }
    },
    {
      path: '/home',
      name: 'home',
      component: r => require.ensure([], () => r(require('@/views/home')), 'Home')
    },
    {
      path: '/echarts',
      name: 'echarts',
      component: r => require.ensure([], () => r(require('@/views/echarts')), 'Echarts')
    },
    {
      path: '/luckdraw',
      name: 'luckdraw',
      component: r => require.ensure([], () => r(require('@/views/luckdraw')), 'Luckdraw')
    },
    {
      path: '/table',
      name: 'table',
      component: r => require.ensure([], () => r(require('@/views/table')), 'Table')
    },
    {
      path: '/picture',
      name: 'picture',
      component: r => require.ensure([], () => r(require('@/views/picture')), 'Picture')
    },
    {
      path: '/drawingBoard',
      name: 'drawingBoard',
      component: r => require.ensure([], () => r(require('@/views/drawingBoard')), 'DrawingBoard')
    },
    {
      path: '/reload',
      name: 'reload',
      component: r => require.ensure([], () => r(require('@/views/reload')), 'Reload')
    },
    {
      path: '/upload',
      name: 'upload',
      component: r => require.ensure([], () => r(require('@/views/upload')), 'Upload')
    },
    {
      path: '/banner',
      name: 'banner',
      component: r => require.ensure([], () => r(require('@/views/banner')), 'banner')
    },
    {
      path: '/swiper',
      name: 'swiper',
      component: r => require.ensure([], () => r(require('@/views/swiper')), 'swiper')
    },
    {
      path: '/keyCode',
      name: 'keyCode',
      component: r => require.ensure([], () => r(require('@/views/keyCode')), 'keyCode')
    }
  ]
})
